﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_QC_SAMPLING_PARAMETERS
// * CreateDate    : 2012/5/7 19:47:01
// * Creater       : CodeSmith
// * LastChangeDate: 2012/5/7 19:47:01
// * LastChanger   : 2012/5/7 19:47:01
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class QcSamplingParametersEntity : EntityBase
    {
        public QcSamplingParametersTable TableSchema
        {
            get
            {
                return QcSamplingParametersTable.Current;
            }
        }

        public QcSamplingParametersEntity()
        {

        }

        public QcSamplingParametersEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.Name = Convert.ToString(CommonFunctions.ToObject(dr["NAME"]));
            this.RangeMinQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["RANGE_MIN_QTY"]));
            this.RangeMaxQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["RANGE_MAX_QTY"]));
            this.CheckQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["CHECK_QTY"]));
            this.NgRate = Convert.ToDecimal(CommonFunctions.ToObject(dr["NG_RATE"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public QcSamplingParametersEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.Name = Convert.ToString(CommonFunctions.ToObject(dr["NAME"]));
            this.RangeMinQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["RANGE_MIN_QTY"]));
            this.RangeMaxQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["RANGE_MAX_QTY"]));
            this.CheckQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["CHECK_QTY"]));
            this.NgRate = Convert.ToDecimal(CommonFunctions.ToObject(dr["NG_RATE"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return QcSamplingParametersTable.Current;
            }
        }

        #region Perporty List
        public string Id
        {
            get { return Convert.ToString(GetData(QcSamplingParametersTable.C_ID)); }
            set { SetData(QcSamplingParametersTable.C_ID, value); }
        }

        public string Name
        {
            get { return Convert.ToString(GetData(QcSamplingParametersTable.C_NAME)); }
            set { SetData(QcSamplingParametersTable.C_NAME, value); }
        }

        public decimal RangeMinQty
        {
            get { return Convert.ToDecimal(GetData(QcSamplingParametersTable.C_RANGE_MIN_QTY)); }
            set { SetData(QcSamplingParametersTable.C_RANGE_MIN_QTY, value); }
        }

        public decimal RangeMaxQty
        {
            get { return Convert.ToDecimal(GetData(QcSamplingParametersTable.C_RANGE_MAX_QTY)); }
            set { SetData(QcSamplingParametersTable.C_RANGE_MAX_QTY, value); }
        }

        public decimal CheckQty
        {
            get { return Convert.ToDecimal(GetData(QcSamplingParametersTable.C_CHECK_QTY)); }
            set { SetData(QcSamplingParametersTable.C_CHECK_QTY, value); }
        }

        public decimal NgRate
        {
            get { return Convert.ToDecimal(GetData(QcSamplingParametersTable.C_NG_RATE)); }
            set { SetData(QcSamplingParametersTable.C_NG_RATE, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(QcSamplingParametersTable.C_STATUS)); }
            set { SetData(QcSamplingParametersTable.C_STATUS, value); }
        }

        #endregion
    }


}

